/**
 * 定义对象类型
 */
interface UserInterface {
  name: string,
  readonly gendar: string,
  age?: number,
  run: (n: number)=> void
}

let user3: UserInterface = {
  name: "张三",
  gendar: "女",
  age: 17,
  run(n) {
    console.log(`跑了${n}圈`)
  }
}
